/*Copyright 2010 by Matt Van Der Westhuizen */

package org.chaoticengine.ast.model;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.core.Resolve;

/**
 * The actual implementation of the TradeGood interface.
 *
 * @author Matt Van Der Westhuizen <mattpwest@gmail.com>
 */
@Root(name="TradeGoodDefinition")
public class TradeGoodImplementation implements TradeGood {
    @Attribute(name="Id")
    protected int id = 0;
    @Element(name="Name")
    protected String name = "";
    @Element(name="BasePrice")
    protected short basePrice = 0;

    public TradeGoodImplementation() {
        
    }

    public TradeGoodImplementation(@Attribute(name="Id") int id,
            @Element(name="BasePrice") short basePrice,
            @Element(name="Name") String name) {
        this.id = id;
        this.basePrice = basePrice;
        this.name = name;
    }

    public int getId() {
        return(id);
    }

    public short getBasePrice() {
        return basePrice;
    }

    public String getName() {
        return name;
    }

    public String toString() {
        return("TradeGoodImplementation(id=" + id + ", name='" + name + "', price=" + basePrice + ")");

    }
}
